/*
public class Test {
    public static void main(String[] args) {
        A a = new A();//普通成员变量
        A a1 = new B();
        A a2 = new C();//向上转型
    }
}
class A{

}
class B extends A{

}
class C extends A{

}
*/
class Animal{
    String name;
    int age;

    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void eat(){
        System.out.println((this.name + "正在吃饭"));
    }
}
class Dog extends Animal{

    public Dog(String name, int age) {
        super(name, age);
    }
}

public class Test{
    public static void main(String[] args) {
            Dog d = new Dog("圆圆",19);
    }
}















